(function () {
    //严格模式
    'use strict';
    $(function(){
        var searchbutton = $(".mainLeft .searchBox button.search");
        var searchtext = $(".mainLeft  .searchBox .searchtext");
        searchbutton.click(function(e){
            var metaFormKeys = searchtext.val();
            if(!metaFormKeys || $.trim(metaFormKeys) === ''){
                return;
            }
//            var list = metaFormKeys.split(',');
//            for (var i = 0, len = list.length; i < len; i++) {
//                YIUI.DocService.removeCache(list[i]);
//            }
            YIUI.DocService.reloadMetaForm(metaFormKeys).then(function(result){
                var dialog = $("<div></div>").attr("id", "reload_dialog");
                dialog.modalDialog(result, {title: YIUI.I18N.getString("DIALOG_MESSAGE","消息"), showClose: true, type: 'warn', height: 170, width: 300});
            });
        });
    });
})();